sntp callback: use a recurrent schedule function#6888
Conversation
|
When using |
|
Here is the test sketch: |
|
You may have not applied the PR (which is not merged yet). |
|
Hi I have tested it with the PR also, then it works, right. But with your description above I understood the rootcause was the yield(). But when using delay(500) for instance without the PR, there is no change. |
|
Is a cb as static function (2.5.2) differently invoked as the functional solution as now in 2.6.2? |
|
In 2.5.2, the function was called from within an ISR-like context that prevented to use most of the API. The current PR allows the call to be made at next (documentation is in |
|
Ah now I think I catched the issue. If I had called it in the loop() funktion it would have worked, but when I am calling it in the setup() it can not work by definition, right? |
A scheduled function used as callback had to wait for next
loop()but user may loop onyield().Using a recurrent scheduled function executed once instead of a simple scheduled function is a fix for this use case.
fixes https://gitter.im/esp8266/Arduino?at=5deb83131659720ca8145e26